<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
		<title></title>

		<link href="lib/ionic/css/ionic.css" rel="stylesheet">
		<link href="css/style.css" rel="stylesheet">
		<script src="lib/ionic/js/ionic.bundle.js"></script>
		<script src="cordova.js"></script>
		<script src="js/app.js"></script>
		
		<style>
			.pane {
				background-color: #F4F4F4;
			}
			.list {
				background-color: #FFFFFF;
			}
		</style>
	</head>

	<body ng-app="starter" ng-controller="MyCtrl">

		<ion-nav-view></ion-nav-view>

		<script id="search.html" type="text/ng-template">
			<ion-pane>
				<ion-header-bar class="bar-stable myPink">
					<div class="row" style="margin-top: -10px;">
						<div class="col col-10">
							<a href="#/home" class="button icon-left ion-arrow-left-c button-clear" style="color: #FFFFFF;"></a>
						</div>
						<div class="col col-80">
							<div class="list" style="margin-top: -7px;">
								<form name="searchFromCopy" style="height: 44px;" novalidate>
									<div class="item-input-inset myPink" style="padding: 8px;">
									    <label class="item-input-wrapper">
									      	<input type="text" name="faqSearchCopy" ng-model="faqSearchCopy" placeholder="为什么小孩不爱吃饭" required>
									    </label>
									    <div on-tap="faqSearchClearCopy();" ng-hide="searchFromCopy.faqSearchCopy.$error.required" class="button ion-android-cancel"></div>
									</div>
								</from>
							</div>
						</div>
						<div class="col">
							<a href="#/result/content/knowledge" nav-direction="forward" class=" button icon-right ion-ios-search button-clear" style="color: #FFFFFF;"></a>
						</div>
					</div>
				</ion-header-bar>
				<ion-content>

					<div class="row">
						<div class="col" style="font-size: small;">热门标签</div>
						<div class="col col-33"></div>
						<div class="col">
							<a class="ion-refresh button-clear" ng-click="doRefreshFAQ();" style="font-size: small;color: #5c5c5c;float:right;">&nbsp换一批</a>
						</div>
					</div>

					<div class="row" style="margin-top: 18px;display:block;word-break: break-all;word-wrap: break-word;">
						<button ng-repeat="f in FAQ" class="button button-small {{f.color}} myPink" style="margin-right: 10px;margin-bottom: 10px;">
					  {{f.text}}
					</button>
					</div>

					<div class="row" style="margin-bottom: 8px;">
						<div class="col" style="font-size: small;">搜索历史</div>
						<div class="col col-33"></div>
						<div class="col">
							<a href="#/result/content/knowledge" class="ion-trash-b button-clear" ng-click="historyClear();" style="font-size: small;color: #5c5c5c;float:right;text-decoration:none;">&nbsp;清空</a>
						</div>
					</div>
					<div class="row">
						<div class="list" style="background-color: #FFFFFF;width: 100%;">
							<div ng-repeat="h in history" style="margin-bottom: 8px;">
								<a href="#/result/content/knowledge" class="ion-clock button-clear" style="color: #5c5c5c;text-decoration:none;">&nbsp;&nbsp;&nbsp;{{h}}</a>
							</div>
						</div>
					</div>

				</ion-content>
			</ion-pane>
		</script>

		<script id="home.html" type="text/ng-template">
			<div>呵呵</div>
		</script>
		
		<script id="result.html" type="text/ng-template">
			<ion-pane>
			<ion-header-bar class="bar-stable myPink">
				<div class="row" style="margin-top: -10px;">
					<div class="col col-10">
						<a href="#search.html" nav-direction="back" class="button icon-left ion-arrow-left-c button-clear" style="color: #FFFFFF;"></a>
					</div>
					<div class="col col-80">
						<div class="list" style="margin-top: -7px;">
							<form name="searchFrom" style="height: 44px;" novalidate>
								<div class="item-input-inset myPink" style="padding: 8px;">
								    <label class="item-input-wrapper">
								      	<input type="text" name="faqSearch" ng-model="faqSearch" placeholder="为什么小孩不爱吃饭" required>
								    </label>
								    <div on-tap="faqSearchClear();" ng-hide="searchFrom.faqSearch.$error.required" class="button ion-android-cancel"></div>
								</div>
							</from>
						</div>
					</div>
					<div class="col">
						<a class="button icon-right ion-ios-search button-clear" style="color: #FFFFFF;"></a>
					</div>
				</div>
			</ion-header-bar>

			<ion-nav-view name="searchResult"></ion-nav-view>
		</ion-pane>
		</script>

		<script id="bbsAnswer.html" type="text/ng-template">
			<ion-nav-view name="bbsAnswer"></ion-nav-view>
		</script>
	</body>

</html>